// 父级模块无法访问子模块中的私有条目
// 子模块中可以使用所有祖先模块的条目

mod front_of_house {
    // pub  公共的
    pub mod hosting {
        pub fn add_to_waitlist() {}
        fn seat_at_table() {}
    }
    mod serving {
        fn take_order() {}
        fn serve_order() {}
        fn take_payment() {}
    }
}

// super 表示上级目录


fn serve_order(){

}


mod back_of_house {
    fn fix_incorrect_order(){
        cook_order();
        super::serve_order();
        crate::serve_order();
    }
    fn cook_order(){}
}

pub fn eat_at_restaurant(){
    crate::front_of_house::hosting::add_to_waitlist();//绝对路径
    front_of_house::hosting::add_to_waitlist();//相对路径
}

// 不带结构体   带;
mod mod_no_struct;
